package com.dtsz.m2.ui.adapter;

import android.content.Context;

import com.dtsz.m2.R;
import com.dtsz.m2.refresh.baseadapter.CommonAdapter;
import com.dtsz.m2.refresh.baseadapter.ViewHolder;
import com.dtsz.m2.ui.model.EcologyOrder;

import java.util.List;

public class EcologyOrderAdatper extends CommonAdapter<EcologyOrder> {
    public EcologyOrderAdatper(Context context, List<EcologyOrder> data, int layoutItemId) {
        super(context, layoutItemId, data);
    }

    @Override
    protected void convert(ViewHolder holder, EcologyOrder ecologyOrder, int position) {
        String beoName = ecologyOrder.getBeoName();
        if ("第一生态".equals(beoName)) {
            holder.setText(R.id.tv_title, ecologyOrder.getBuName() + "向" + beoName + "支付");
        } else {
            holder.setText(R.id.tv_title, ecologyOrder.getBuName() + "向" + beoName + "转币");
        }
        holder.setText(R.id.tv_price, ecologyOrder.getBeoPrice() + "㎡");
        holder.setText(R.id.tv_create, ecologyOrder.getCreateTimeStr());
    }


}
